/**
 *
 * @properties={typeid:24,uuid:"7B621093-0465-48B6-9E2D-6E53BA304DE3"}
 */
function Iniciar() 
{
	globals.gtotal_varios 	= 0;
	globals.gtotal_valores	= 0;
	globals.gtotal_saldo	= 0;
	totales_valores();
	totales_varios();
	}

/**
 *
 * @properties={typeid:24,uuid:"3B55DB40-31AE-4C7E-B258-3F686065D6D5"}
 */
function totales_valores() 
{
	globals.gtotal_valores = 0
	for ( var i = 1 ; i <= op_cabecera_to_op_detalle.getSize(); i++ )
	{
		op_cabecera_to_op_detalle.setSelectedIndex(i)
		globals.gtotal_valores += op_cabecera_to_op_detalle.importe
	} 
}

/**
 *
 * @properties={typeid:24,uuid:"80E5EF01-3245-4385-A2CB-D8BA1382743B"}
 */
function totales_varios() 
{
	globals.gtotal_varios = 0;
	for ( var i = 1 ; i <= op_cabecera_to_op_detalle_varios.getSize(); i++ )
	{
		op_cabecera_to_op_detalle_varios.setSelectedIndex(i);
		globals.gtotal_varios += op_cabecera_to_op_detalle_varios.importe
	}
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"3C7E397A-A230-44B3-93E6-9824C3D7DC12"}
 */
function imprimir(event) 
{
	forms.opago_varios_imp.controller.showPrintPreview(true);
}

/**
 * @properties={typeid:24,uuid:"F35DAC43-D277-45D8-B81B-7A700637C708"}
 */
function pdf()
{
	globals.metodoPdf('opago_varios_imp','Orden_pago_varios',false)
}